package chapter10.practice15;

/**
 * 匿名内部类生成的.class文件  Second1.class
 * Created by yangliwei on 2017/10/21.
 */
public class Second {

    public First getFirst(String item){
        //直接用匿名内部类传参数
        return new First(item){
        };
    }

    public static void main(String[] args) {
        Second second = new Second();
        First first = second.getFirst("I'm first");
        System.out.println(first.getItem());
    }
}
